﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:markup="clr-namespace:Elysium.Markup"
                    xmlns:controls="clr-namespace:Elysium.Controls">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/Themes/SharedResources.xaml"/>
        <ResourceDictionary Source="pack://application:,,,/Themes/Ranges/ProgressBase.xaml"/>
        <ResourceDictionary Source="pack://application:,,,/Themes/Ranges/ProgressBar.HorizontalTemplate.xaml"/>
        <ResourceDictionary Source="pack://application:,,,/Themes/Ranges/ProgressBar.VerticalTemplate.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <Style x:Key="{x:Type controls:ProgressBar}" TargetType="{x:Type controls:ProgressBar}" BasedOn="{StaticResource ProgressBaseStyle}">
        <Setter Property="Background" Value="{markup:ThemeResource PaleBrush}"/>
        <Setter Property="BorderBrush" Value="{markup:ThemeResource NormalBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Foreground" Value="{markup:ThemeResource AccentBrush}"/>        
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Style.Triggers>
            <Trigger Property="State" Value="Busy">
                <Setter Property="Background" Value="{x:Null}"/>
            </Trigger>            
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Foreground" Value="{markup:ThemeResource DisabledBrush}"/>
            </Trigger>
            <Trigger Property="Orientation" Value="Horizontal">
                <Setter Property="MinHeight" Value="2"/>
                <Setter Property="Height" Value="4"/>
                <Setter Property="MaxHeight" Value="8"/>                
                <Setter Property="Template" Value="{StaticResource HorizontalProgressBarTemplate}"/>
            </Trigger>
            <Trigger Property="Orientation" Value="Vertical">                
                <Setter Property="MinWidth" Value="2"/>
                <Setter Property="Width" Value="4"/>
                <Setter Property="MaxWidth" Value="8"/>
                <Setter Property="Template" Value="{StaticResource VerticalProgressBarTemplate}"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    
</ResourceDictionary>